adding log_history and send_email options