add ctrl-c
optimize script finding.