figure out how to create file object