refactored Export action to better handle errors in go routines