Changed the error type
Achieved 100% coverage of the Main file