try catch sequence for raw input