added debug line for image receiving
added exception logging