Better handling of empty files