Simplified ./bin/detect