Please chmod affiliates.txt your the templates folder to 777.