added logs to controller