Change die() to dieWithErrorLog()