Now saves map to file and reads it instead of passing it