Comments about test files: In your badInput.txt - in order to test acceptible file name for the 's' command, make sure there is at least on image in the loop first