Use attachment_dir only at the point where we're actually