Added try/catch to ServiceMain to check for non-numerical input