added logger
fix restart problem