Controlling nanopore size, shape and stability