use the right filename in output