Use standard st_mtime instead of st_mtim.tv_sec
Unused variables