Added header when printing errors and switched fail on error ordering