added getfile func