Fixing require to include the filename in error messages