Added checks to see if file has been attached