added try/catch in loop as it breaks in environments without certain mappings