fix write file bugs
add examples of cifar10