Changed echo to log_and_print

So it can be logged to database