Added debug output. Updated adapter.