Add logging to the GCM code