added condition to check whether the drafts directory exists.