Refactor CompileFile function to provide a basic command-line tool