imported check_output