Bug fix for spamming error log in case of memory issue.

* When web server has memory issue, it is getting 'false' which should not pass to fwrite function. Adding another condition to prevent it.