Add logging and prep for php & db stuff