Only display the error message for invalid files

The full traceback is useless since it is going to be the same every time