Updated to remove ~ in file pointers