save db to file on sigint