Added log file to the temp compiler folder, when logging is requested.
Reformatted code, so that all archiving is done after the log file is written, and the caller gets a proper response.
Log the name of the archive in case archive option is set.