Adapt File API to modularized code base

Jira issue: WP-1015