File reader and writter updated