Changed method of splitting off filename