Took out some debugging code, cleaned up downloadFile function a bit.