shared_ptr NULL judgment removed; try catch in lib prints to cerr and re-throws