diff --git a/source/theme.c b/source/theme.c
index 01196ca2..27c9f508 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -860,7 +860,10 @@ gboolean rofi_theme_parse_file ( const char *file )
char *filename = rofi_expand_path ( file );
yyin = fopen ( filename, "rb" );
if ( yyin == NULL ) {
- fprintf ( stderr, "Failed to open file: %s: '%s'\n", filename, strerror ( errno ) );
+ char *str = g_markup_printf_escaped ( "Failed to open theme: %s\nError: %s",
+ filename, strerror ( errno ) );
+ rofi_add_error_message ( g_string_new ( str ) );
+ g_free(str);
g_free ( filename );
return TRUE;
}