more basic checks and debugging