Fix unused_result warning in script_task