Add bedrock_printf attribute and use it for various functions/fix various issues