script to convert log file to json file