cleanup, collect external resources in artifacts