changed compilation driver so that it writes the compilation results to files instead of the console. (it also generate the json code)