Test and debug the check functions