Added a method to convert File into FileObject