Replace error_log statements with system log calls