output to file and adapted names