add if statement to preview image loading to prevent FC, cleanup logs