CSP support, logging fixes