Better error message for incorrect file contents