updated writing to source file
added the ability to specify the compiler