Move import atexit to the "preamble"