Error handling in main menu