Added fn to copy the buffer's path