Removed unnecessary directory truncation