Improve error message of library test