Added util file, tested, changed the way of saving files (using extension)