Avoid exception when RefreshFile shouldn't crash if no file is loaded.