adding warning for debug builds
added single-mode detection