(partially) fixed the mtime comparison logic + comments