Changed document directory load to initialization phase.