FileWriter bugfix
cleanup