1. added close function to databaseService class
2. added additional logs