got rid of trailing newline in json output