Added graceful error handling for imagemagick