Set non-zero exit codes when errors happened

Otherwise scripts cannot determine if the import went through