write amnesty files function