implemented buffer

so that the exec command isn't run if process is being killed for long time
new version