Fix issue with threading
Fix issue with reading cache file