Improve missing dependencies report. Print the cause of the problem. 

And cover missing dependencies functionality with tests.