add options to handle log file.