Write a log file with executed sql queries.