rewrite curl decode file