added code in _truncate() call to fix the path