Daily/Hourly Logfile, Fix of Logfile

As the log.txt, generated by write_log(), becomes very big i've added a possibility to create a new log file each day and each hour.

Also I've fixed a small bug with the backtrace info. These lines were without a value.