added general error logging with stack trace