Add checking thread pool function