add basename to mask