get rid of printing debug info
fix errors in writing and loading database