Sanity checks, only deal with files if needed