Added NPE catch for source class, when it cannot read imported classes or packages.