controller: fix migration of key files. #closes #1184