changed exitting behaviour
changed message format from JSON to plain text