Output flag is always first
Don't do checking for files, they may not exist at this point