Adding error checking to help with unknowns.
updating for ubuntu.