NMS-6361 fix handling of spaces in filename