using try-except block to handle user input arguments