improved logfile: added more metadata info and timestamp logs so they don't get overwritten