Handle IMAP errors a bit better