Make both Debian as well as Ubuntu routines more bulletproof