added reference for System.Drawing.dll, also returning more descriptive error messages from API