added console messages and readded self-invocation as sudo