Updated to support resources loaded from class path.