Wrap the main loop in a try catch for vanishing message handling, fix delete method to work correctly with gmail rather than imap standard