fixed insert statement
log print
formatting