returning json output in stdout from fly machine

this is solved. i had to do a printf to keep the valid json state.