Fix the set context return code, add more debug to help plugin development

Should be enough debug now...