test write to output file