I was getting lots of errors while uploading and creating thumbnails on Mediawiki. While following through mediawiki support pages found that I have to disable the following line in LocalSettings.php
#$wgUseImageMagick = true;
And yes, that did the trick. Thumbnails started working fine.
Hmm.. good for now.