Python versions below 2.7.6 need the file pointer to be reset