use timeout instead of set immediate
add data-structures and dict to dependencies
ensure cache location and reduce the lifetime of the fdCache