added -o option to specify output json file path