Added a check for encrypted objects and skip them when scripting.