update log file + other improvements