Write variables to log