Handle error gracefully and continue

http://ideone.com/JOIAfB