introduced cli command line handling redirection and reworked if-else and try-catch-finally to use that feature