Added logging for controller