Added logline function, log file deletion, etc.