Fixed bug when downsampling - create directory