try except block for prod env variables