Error Handling in mode manager