added debug mode 'd' for *Mode in protections