file_stream simplified and linkage improved.