added shutdown hook to clean up database files when JVM is shutdown