add function cprint to print a line in anywhere