test file opening exceptions