add missing arguments to write statement