Add missing imports so file.managed works

Fixes #5406