Added timestamp to log file. Reworked shell script