Added third argument (file extension)