Refactor into the Runner.php file. And fix a file permission fixes #2