Added in log file handling.