Improve missing dependencies report. Print the cause of the problem. Cover missing dependencies functionality with tests.