Adjust libraries and add download directory check