Signal catching for ^C implemented