fixed bug of writing in wrong grit_log file.