Is this meant to just check that it has an extension? Don't you want to make sure it ends with .less (/\.less$/)?