Implement debug for GCM func