adding debug logging for validation