Log exceptions if any rise in get_format()
Add missing tests for get_format() function