implemented catch of Ctrl+C