Turn off raising warnings via parameter

Because warnings.catch_warnings() is not thread-safe.
https://docs.python.org/3/library/warnings.html#warnings.catch_warnings