Check for operating system to avoid OSX errors