Engine fixing
Add some engine error checking