Made log write to a .log file instead of .pl