improve examples
test for handling mkdir failure