Initial implementation of retry decorator