Fixes detector file opening