Rules checked during histogram loading

During histogram input, the following rules are checked, and error messages are printed if the rules are violated: