added error testing to map prep and montage scripts