further improved file behavior