Fix in fromFile() method

Method was trying to put file from non-existing object.