writes text to file for cas12-14