Made exception usage more fine grained