Return a std::unique_ptr from getBufferForFile. NFC.