added some print statements on db write so that we can tell the app hasn't crashed in the logs