add confirmation for destructive commands
fix ruby 1.9 compatibility