Okay, I placed the 'e' correctly here. But isn't word order sufficient to indicate that it is the "man" that I know, and not the "friend"?
No. jup loStaHbogh loD vISov could equally mean "I know the man who is waiting for a friend" or "I know the friend whom the man is waiting for".
-bogh can relativise either the subject or the object.
But note that it's not actually required for you to disambiguate. If you're happy leaving off the -'e', either because it's not important to disambiguate or because you like the ambiguity, you may.