Properly set up sys.path, add logging to debug-exports