added console for better debugging.