must check if a file exists before doing a bunch of stuff to it
get rid of unnecessary imports