moved file extension handling from snake_it to script code