Error message passing fix, some debugging