added json and file output
removed print statements