added the test file exception handling