Better library checks (#1)