add O_APPEND support