use template to stop file_vectors of simple pointers and references