Fixed csv output and loglevel