refactored exception in one file
added timeout