Added errorlog function back.
Added errorlog function back.