fixing case where file hangs so that it actually tries to run with another order