The only way to diagnose the problem is to find out what happened.
In the first case, you could try an organic extraction and analyse what you get.
In the second case, isolate the products of the reaction and identify them. It's a pain, but really there is no other way to understand why the reaction failed.