Added caching of database file.