Small Change

Used File Writer for writing for flush option