diff --git a/stmhal/file.c b/stmhal/file.c
index 6d743a0c8cc9288150cc146c1e5de231e2858c58..57d3d33847e3cb0c5b34752b970aeb5a6ff9e937 100644
--- a/stmhal/file.c
+++ b/stmhal/file.c
@@ -15,7 +15,7 @@ typedef struct _pyb_file_obj_t {
 } pyb_file_obj_t;
 
 void file_obj_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind) {
-    printf("<file %p>", self_in);
+    printf("<io.FileIO %p>", self_in);
 }
 
 STATIC machine_int_t file_read(mp_obj_t self_in, void *buf, machine_uint_t size, int *errcode) {
@@ -69,7 +69,7 @@ STATIC const mp_stream_p_t file_obj_stream_p = {
 
 STATIC const mp_obj_type_t file_obj_type = {
     { &mp_type_type },
-    .name = MP_QSTR_File,
+    .name = MP_QSTR_FileIO,
     .make_new = file_obj_make_new,
     .print = file_obj_print,
     .getiter = mp_identity,
diff --git a/stmhal/qstrdefsport.h b/stmhal/qstrdefsport.h
index c846adc1985f0baa56bd675f402dbbcc791bcd54..2c41f1b7876bb53f5a0582c16069322d08f21d92 100644
--- a/stmhal/qstrdefsport.h
+++ b/stmhal/qstrdefsport.h
@@ -33,7 +33,7 @@ Q(SDcard)
 Q(gpio)
 Q(gpio_in)
 Q(gpio_out)
-Q(File)
+Q(FileIO)
 // Entries for sys.path
 Q(0:/)
 Q(0:/src)
diff --git a/unix/file.c b/unix/file.c
index 2cc17dfd346c3349dc543fb9eeaf43e59cec4d86..fa7be791a4d431f0a8551126f965ba7ecb3c6eee 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -130,7 +130,7 @@ STATIC const mp_stream_p_t rawfile_stream_p = {
 
 STATIC const mp_obj_type_t rawfile_type = {
     { &mp_type_type },
-    .name = MP_QSTR_io_dot_FileIO,
+    .name = MP_QSTR_FileIO,
     .print = fdfile_print,
     .make_new = fdfile_make_new,
     .getiter = mp_identity,
diff --git a/unix/qstrdefsport.h b/unix/qstrdefsport.h
index fd259f327cb34376d3d3502536c6801f116ffd6e..a4772a2be9f048a13178bc39c204d8949d52ea79 100644
--- a/unix/qstrdefsport.h
+++ b/unix/qstrdefsport.h
@@ -27,7 +27,7 @@ Q(accept)
 Q(recv)
 Q(setsockopt)
 
-Q(io.FileIO)
+Q(FileIO)
 Q(ffimod)
 Q(ffifunc)
 Q(fficallback)