activity pass message and write read file