fix filename and newline