synchronized access to target dir (untested)