Added some DB logging