[JY] fix deployment issue to save history right after each package deployment