minor fix
fixed issue when using FileWriter