improve removeRecord
merge with local file