add a test program for using gcd to write files