saves path as bagfile, made threadsafe