fix possible issue with double read of frames in conf
add define for thread pool debug