diff --git a/vmm/vmm_main.c b/vmm/vmm_main.c
index 1f5b037214df242b83f3c62fd1ff008454259530..50cceafeea502d435e0b17f3d9c6d7cc9b199094 100644
--- a/vmm/vmm_main.c
+++ b/vmm/vmm_main.c
@@ -125,7 +125,7 @@ int main(int argc, char* argv[])
 
     // Get the file size using fstat
     struct stat st;
-    if (fstat(binfd, &st) < 0) perror("Error getting file size");
+    if (fstat(binfd, &st) < 0) err(1, "Error getting file size");
 
     // Check if the file size exceeds the available memory
     if (st.st_size > RAM_SIZE) err(1, "Error: GuestOS binary size exceeds 512KB\n");