sgw: policy script: log invocations and add cleanup mode