Added logging via middleware