replaced die() with exit() in download library