Added unit test for checking file corruption