better error support for print in gateway