Improved error messages in preconditions