Added writing output