added error logging to cli controller so it doesn't crash out