add dashdash to basename call for safety