Load the whole file to the buffer before scanning