Use the logging module to save log file