revert r9510
simplify CreateControllerForFile