Correctly apply catch_warnings()