add checks for predefined constants and ensuring class matches file