outputting command to textfile rather than executing