cleaned up error codes and abort