move task.json to examples
reduce redundant readfile
update loop