Added exception logging for poll()