Added file exist check for attachments