More thorough error checking of library calls.