Added additional error handling, guaranteeing continuation of program, and in-place file writing to indicate downloaded links, as well as the ability to change the output directory