Make sure that file is regular file when getting local hash