fixed error logging problems in synchronous library calls