Fix error message when filename is mismatched