wrong handling of files