add atexit callback to cleanup the gpio pins