make sure we dont write a file we dont need