Move printr() function out of plugin logic.