CLIfile: check existence of self
cli_spin: check that the generated file does not overwrite the original file and allow for ending header with tag '#/header'