removed useless string casting
added automatic version logging
added mtime to version logging