files with the size zero throws an exception, Issue #5604