Adding new utility function getfilename ()