Changing plug when dealing with errors

Using log instead of raising exception