Added function for returning extension of file