buffer the file input stream.