Better error messages for bad filename input