Added re-directable print function