print filename only once, indent errors