Adding an error message system (fixes #17)