Several security and file attachments changes