can be removed, this is fstream stuff