check for overwriting of files