New functions for composing output file