Provide more user-friendly errors when opening file handles.