[files] fix mock creation and remove hardcoded 'require' statement