Added more error output and fixed go warnings