Using log instead of traceback