Fixed bug with very long filenames