Small modifications to write path and log file