add handle logic for database location changing