Added print statement to die() so that exact error is known.