add process monitor, fix some bug