fixed the file handle increase issue, caused by not close the handle when finish the reading