I tried adding CSS and JS files in minify options in W3TC. W3TC produces empty minify files causing the whole layout to break. I also tried disabling rewriting in minify options but to no avail. Then I enabled debug mode in WP-config after which I got the following errors:
Notice: Undefined offset: 2 in www/*.com/public_html/wp-admin/includes/plugin.php on line 1238
Notice: Undefined index: performance_page_w3tc_minify in www/*.com/public_html/wp-content/plugins/w3-total-cache/lib/W3/Plugin/TotalCache.php on line 990
Note: Minify for HTML works absolutely fine. Minify for CSS and JS is the one causing the problem.