FIX: change return type of scan_dir from json to html