Check for file problems using exceptions