Add test case for handling failed files.