add optional json output
include body into json output
reintroduce output order