bugfix: work with truncated filenames