implement non-immediate upload and fix compile error in TimedLogger

Hi Stephen, please have a look at my humble pull request and let me know if it's fine.

Thanks,