Added line to check all required inputs are provided