fixed never closed file handle
data migration script complete