threw exception if class path resource does not exist