Added cleaning of 'OutDir' variable