writes stdout of mysqldump to file