fix an error in refreshing db when locate the insert.sql