Added some safeguards against non-existent files to make unit test failures more clear