finish writing pal_LoadBuf