fixed buffer size issues and logging process/thread logging statements