write palindromes to file