ENH: Fix race conditions and provide better debugging.
ENH: autopep8 configure and remove debugging printf's