The code above is probaly coming from other places where we are printing. Do you see a way to put it in a service and use it everwhere from this service?