Update dart:io artcle to new API