Log, catch and JSON improvements