raised errors rather than exting the program when problems are reaching in the try-catch.