tiny bugfixes, write.warning