Adding generic print function.