Renamed safe_operation to safe_function