save trial time info and some optimization for log file