Add createfrom file method