fix flushing of messages in doJob
docs (roxygen update)