waf: add more checks