rudimentary error checking, dont include debug symbols
since gdb doesnt seem to work with this anyway