file.replace(append_if_not_found) - test units