fix fileinstream bug