change shim to not take the options from the stdin

this makes us modify the shim code inline with the options, while
less clean code wish it is cleaner execution wise.
this still doe snot fix the problem though, as the stdin readline still
does not block