Updated error handling for library class. Fixed typo in user class.