Added terminal output functionality