Fixed issues with run file generation