More error_log()s and possible fix