Refactoring the output flag.