Added error checking and change md5sum location