Task to write activities in a log file