remove unneeded re import
pylinting, better log messages, docstrings, no logic changes
correctly check for verify_master_pub_sign when no key accepted before