changed tempfile name in add_to_location