Updated preamble comment
Improved data checking and added some phpDoc to function SWDF_add_img_path