add axis hat support

loax:
ef503b6 add axis hat support
599e88a flush stdout for logging
3e7a365 fix location to prevent deadlock