creating test for file errors