some simple logging, and gross threading