Find first file in buffer instead of using new variable

There is no need to introduce another variable when the data is already in buffer. `buffer` is also used when creating a new file using `new gutil.File`