kill process if error