write to logfile successfully