bug fix using $temp_name to read the file instead of file->path