add sleep in tomcat restart function