Moved error_log line for prepared statements