Fixed a bug with substitution of only empty records; added the --substitute option in the main App