Supress errors only if not verbose
Rewrite distance calculation with scipy cdist