Add version checks and proper error formatting to escripts. Closes #2709