use native map, print error to console