another unsafe cross thread call

and removed cocotus procedure to use the one in fileutils