Missing error logging added