Refactor based on feedback

Replace duplicate code with retryOSMImport()