Adding a print thread. Work in progress