cfi: leave check on whether target is running to target_write_memory()