fix strange bug with randomly occuring empty files ...