fix for stacktrace on empty files