added possibility of defining a filename (without extension)