Change everything to store error code through provided pointer and not