Fixed filename not properly selected when space characters present in the path