Better error handling, fixed glitch in library GUI