ENH: switch input file order

this way the grayimage and its mask is together