Resistive switching characteristics of thin NiO film based flexible nonvolatile memory devices