Move the file clearing only to when an error has been caught, so that Reload still works for successfully-loaded files.