Support O_APPEND flag in the write callback