Added start of error logging