A mistyped invocation for pmDJ can result in accidentially overwriting a .smd file with .mid data
pmDJ foo.smd bar.smd - Overwrites bar.smd with MIDI data from foo.smd
pmDJ foo.smd bar.smd baz.mid - (intended command) Writes MIDI data to baz.mid
Solution would be to check the file extension on the argv[argc-1] argument.