more informative error message for opening files