bug file to appendToFile