modified writer and filer class