Updated check-task script