Added an additional error check and some logging to the AbstractEngine.