added csv writer, test command in interactive mode