Add safe json_encode
Shutdown manager