trapped console log to flush and thus keep things in order