modified stdout to print with the json format