Vectors cannot have const items, must be assignable

Also, endlines on error messages
Kinda need <algorithm> for min_element
Refactoring open_log() to take an ofstream &
Adding pthread macro