better support for empty files