threading works/have to find a way chdir threadsafe