Adds select, still an issue, it waits for 12 seconds then closes, and gets half of the file.