print to log file functionality added