Defect engineering of two-dimensional transition metal dichalcogenides