Add additional error checking in mainframe script
Version 0.1.19