cmd to output file working