Append returns -1 on failure