close file stream after file read completed.