added output directory to downloading file