working for single files, but not for dirs, which were working before