Moved exceptions into a separate file