Added command line argument for settings the log path
Added a shutdown hook to dump log file