Fix a logging bug, output event json files