use buffered io