Task for logging activities to a file