When loading a file, make sure the appropriate target is active