write to logfile crashfix..?