Changed placement of clear_screen as it hid some error messages