Move error to its own file
Have code check error status
Inline adding of source