Refactored output methods to overload the name of "write".