Make sure file exists before manipulating