security: add more debugging to create context