integrated readFile, EncodeFunction and ManageWriteFile