add process signal handler and file operation