changed exception catching for better debug purposes