More robust with mask file names