removed php notice and altered log table schema