verify validity of input file.
No need for if statements.
only write meta that exists.
ignore swap files.