Adding method to get console output