fixed bug with changed directory and file download