web app added
fixed bug in next_file algorithm