Updated array validation and cert file permissions
Removed obsolete code