optimize allocation in get_file_contents and set_file_contents
[de]allocate -> default_[de]allocate ; add [de]allocate function