Fixed syntax error and added SIGINT for trap