added try arround action code that caused exceptions on osx