check when adding attachment: if exists, do not add again