Exception class has to be imported properly