Write to a file the command