Dumps JSON on SIGTERM and SIGINT