fixes #354, added writeLibrary config