Move csv module to dependencies fix csv file writing error