Removed error print function