fix for reset/run-auto race condition

MAGN-3572
Merge pull request #1775 from Steell/open-file-run-auto-race-cond

fix for reset/run-auto race condition