Write to console using separate thread (fixes #11)