improving logging in command line
adding stderr