Create distance_check.js