Update pattern.c

change file output format