Binary tree recursion java

I want to write a function which returns a string of 0s and 1s to signify a path from root Node to specific node p, where 0 means go left, and 1 means go right.

    __3__
   /     \
  4       5 
 / \     / 
9   2    1

2 should return "01"

public String traverse(TreeNode root, TreeNode p,String s) {
    if (root == p) return s;
    if (root.left != null) return traverse(root.left,p,s + "0");

    if (root.right != null) return traverse(root.right,p,s+ "1"); 

    return "-1";
  }

This is my idea of recursive way but it just returns -1 when it gets to a leaf, whereas i want it to continue the recursion. As in, to find 2, it tries 3 -> 4-> 9, but does not continue 4's recursion, but stops at 9. What can I do?