close the json db file after writing, just because