deleted log files. rewrote log function