Added statement to log exception