scripts to handle log file