credits where due :-)
move file_import actions to its own module, with already a shareable createDocument() method