Added error checking
Added newlines to fix markdown