Fix error logging
Not print trace if empty