Moved usefull function fonr minefield-io to utils.