Abstracted the string generation into print_out_type