rename opticalTopo to opticalUtils and add better error checking