Trying to get csv writing working