improved library handling and messages