fileToBuffer and bufferToFile complete