Added custom exception for getInput function