added exception handling to check_resume and set_paused