added default value to arguments, env and vars and moved check to the template.