added methods to read and write file content