debug: preserve O_APPEND flag on debug output file descriptor