Add exception handling and fixed proper readme format