depending on file-object