Fixing headers already sent error when using WP_DEBUG