create module file, reconstruct imports