introduce $NAME

NAME can be set externally to define the output file name so we don't
have to guess elsewhere