Update madam.sh

Check if file exist. 
Improvement in speed.