Database now opens only on startup