Better Exception Handling in RackAgent

Its needed