Fixed & tested readLibraryS/readLibrarySSync functions