Replace deprecated function calls with correct equivelent

error is deprecated and emits warnings in developer mode, print_error should be used in its place. Also switched them to use the relevant core strings.