fix gen script amount logging
fix signal handler interface problem