console wrapper function