add error logging and simple controller spec