Added cookie support to retrieve proper file.