Improved non-git handling, catch SIGTERM