Improve error message for non-matching file name