fix error left after last refactor
support option for greedy mode
to work as command, must have correct file
5.1.1