Added -N switch to allow Non-interactive mode