Check mask

Modifications to build check_masks on Raijin (NCI).