fix naming and remove tmp files