Added JSON error messages
Added supervision and logging