Better json message STDOUT writing