#142 fixed casing issue in detected defined prefixes
added debugging statements