open file and get object