added logging into db functionality w faving file