Added debug output in run_file.
Fixed a bug in run_file.