Added controls for argument inputs. Now it is not possible to pass arguments of different mode. This avoid cryptic messages when incorect mode is passed to internal code.
Improved reported error mesasges to navigate user better in the process.
fixed formatting