Buffering and upload script