Consolidate controllers, write file, and store ID