fixed image posts, and added more error logging