I think you should handle errors here. The unconditional output should be removed, instead having useful output telling what happened if the create did not succeed (as in the snippet that was posted).