Adds different output extension according to mode. Refs #2.