added exception for empty library