bugfixes and added simple warn logger.