Added debug messages and removed unnecessary poll_item