Remove the list braces if writing to file