use utility function to get file extension