Added thermal printing code