Fix issue with file basenames